package com.intretech.umsin.datasource.entity;


import com.intretech.umsin.datasource.constant.ResolvedCodeType;

import java.util.Arrays;

/**
 * @version V1.0
 * @ClassName: ResolvedSqlResult
 * @Description:TODO(解析sql模板内容返回的结果对象)
 * @author: 李启联
 * @date: 2018-04-26 17:21
 * @Copyright: Copyright (c), 2018-2018
 * 申明：本内容未经作者本人同意,禁止外泄以及用于其他的商业项目.
 */
public final class ResolvedSqlResult {
    private ResolvedCodeType resultCode;
    private String resultDesc;
    private String resultSqlScript;
    private Object[]  params;

    public ResolvedCodeType getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResolvedCodeType resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultDesc() {
        return resultDesc;
    }

    public void setResultDesc(String resultDesc) {
        this.resultDesc = resultDesc;
    }

    public String getResultSqlScript() {
        return resultSqlScript;
    }

    public void setResultSqlScript(String resultSqlScript) {
        this.resultSqlScript = resultSqlScript;
    }

    public Object[] getParams() {
        return params;
    }

    public void setParams(Object[] params) {
        this.params = params;
    }

    public ResolvedSqlResult() {
    }

    public ResolvedSqlResult(ResolvedCodeType resultCode, String resultDesc, String resultSqlScript, Object[] params) {
        this.resultCode = resultCode;
        this.resultDesc = resultDesc;
        this.resultSqlScript = resultSqlScript;
        this.params = params;
    }

    @Override
    public String toString() {
        return "ResolvedSqlResult{" +
            "resultCode=" + resultCode +
            ", resultDesc='" + resultDesc + '\'' +
            ", resultSqlScript='" + resultSqlScript + '\'' +
            ", params=" + Arrays.toString(params) +
            '}';
    }
}
